<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理员-图书管理系统</title>
    <link href="/layui/css/layui.css" rel="stylesheet" media="all"/>

</head>
<div class="layui-layout layui-layout-admin">

    <div th:include="common/admin_header :: header"></div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree">

                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">书籍管理</a>
                    <dl class="layui-nav-child">
                        <dd class="layui-this"><a href="/addBookPage">&emsp;&emsp;录入新书</a></dd>
                        <dd><a href="/addCategoryPage?pageNum=1">&emsp;&emsp;新建类别</a></dd>
                        <dd><a href="/showBooksPage">&emsp;&emsp;查询书籍</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/showUsersPage?pageNum=1">&emsp;&emsp;查询用户</a></dd>
                        <dd><a href="/addUserPage">&emsp;&emsp;新增用户</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">借阅信息</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/allBorrowBooksRecordPage?pageNum=1">&emsp;&emsp;所有记录</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item"><a href="/adminInfoPage">个人信息</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body layui-container"
         style="margin : 10px auto; padding:10px 16px ;border: 200px; width: 480px; height: 580px; background-color: #f2f2f2">

        <hr class="layui-bg-blue">
        <h2 style="text-align:center">添加书籍</h2>
        <hr class="layui-bg-blue">

        <div style="width: 420px; padding: 20px; margin: auto auto; background-color: #f2f2f2">
            <form class="layui-form" id="addBookForm">

                <div class="layui-form-item">
                    <label class="layui-form-label">书 名</label>
                    <div class="layui-input-inline">
                        <input required lay-verify="required" id="bookName" type="text" name="bookName"
                               placeholder="请输入书名" autofocus
                               class="layui-input" autocomplete="off">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">作 者</label>
                    <div class="layui-input-inline">
                        <input id="bookAuthor" lay-verify="required" type="text" name="bookAuthor" placeholder="请输入作者"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">出版社</label>
                    <div class="layui-input-inline">
                        <input id="bookPublish" lay-verify="required" type="text" name="bookPublish"
                               placeholder="请输入出版社" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">类 别</label>
                    <div class="layui-input-inline">
                        <select lay-verify="required" id="bookCategory" name="bookCategory">
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">价 格</label>
                    <div class="layui-input-inline">
                        <input id="bookPrice" lay-verify="number" type="text" name="bookPrice" placeholder="￥"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">简 介</label>
                    <div class="layui-input-inline">
                    <textarea id="bookIntroduction" lay-verify="required" name="bookIntroduction" placeholder="请输入简介"
                              class="layui-textarea "
                              autocomplete="off"></textarea>
                    </div>
                </div>

                <!--lay-filter重要 , js 会用到-->
                <div style="margin-left: 100px">
                    <input type="submit" lay-filter="btn1" id="btn1" class="layui-btn" lay-submit="" value="添加图书">
                </div>

            </form>
        </div>


    </div>
    <div th:include="common/footer :: footer"></div>

</div>

<script src="/scripts/jquery.min.js"></script>
<script src="/layui/layui.js"></script>
<script src="/scripts/admin/addBook.js"></script>

</body>
</html>
